const { DataTypes } = require('sequelize');
const sequelize = require('../db/seq')
const Product = sequelize.define('product', {
    // 在这里定义模型属性
    productName: {
        type: DataTypes.STRING,
        comment:'产品名字'
    },
    price: {
        type: DataTypes.INTEGER,
        comment:'价格'
    },
    productImg: {
        type: DataTypes.STRING,
        comment:'产品图片'
    },
    contact: {
        type: DataTypes.INTEGER,
        comment:'联系方式'
    },
    productType: {
        type: DataTypes.INTEGER,
        comment:'QQ'
    },
    userId: {
        type: DataTypes.INTEGER,
        comment:'用户标识id'
    }
},{
    timestamps: false
});
//强制同步数据库（创建数据表）
// Product.sync({ force: true });
// Basics.sync({ alter: true });
module.exports = Product
